<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <script src="../jQuery-3.6.3.min.js"> </script>
    <script>
        $(function () {
            $("#a1").mousedown(function (e) {
                switch (e.which) {
                    case 1: alert("1"); break;
                    case 2: alert("11"); break;
                    case 3: alert("123"); break;
                }
            });
        })
    </script>
</head>

<body>
    <input type="button" id="a1" value="一次事件">
</body>

</html>